package com.qf.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
public class Coupon implements Serializable {

  @TableId(type = IdType.AUTO)
  private Integer id;
  private String subject;
  private String subtitle;
  private Integer utype;
  private Integer priority;
  private String content;
  private String ruleInfo;
  private String limitInfo;
  private Integer method;
  private Integer type;
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date beginTime;
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date endTime;
  private Integer days;
  private Integer number;
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date goStartTime;
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date goStopTime;
  private Date createTime = new Date();
  private Integer status = 0;

  //标记该优惠券是否领取过
  @TableField(exist = false)
  private boolean hasGet = false;

}
